using System.Diagnostics.CodeAnalysis;

namespace NQuery
{
	/// <summary>
	/// Represents the error id used by <see cref="CompilationError.Id"/>.
	/// </summary>
	public enum ErrorId
	{
		InternalError,

		IllegalInputCharacter,
		UnterminatedComment,
		UnterminatedString,
		UnterminatedQuotedIdentifier,
		UnterminatedParenthesizedIdentifier,
		UnterminatedDate,

		InvalidDate,
		InvalidInteger,
		InvalidReal,
		InvalidBinary,
		InvalidOctal,
		InvalidHex,
		InvalidTypeReference,
		NumberTooLarge,
		TokenExpected,
		SimpleExpressionExpected,
		TableReferenceExpected,
		InvalidOperatorForAllAny,

		UndeclaredTable,
		UndeclaredParameter,
		UndeclaredFunction,
		UndeclaredMethod,
		UndeclaredColumn,
		UndeclaredProperty,
		UndeclaredType,
		UndeclaredEntity,
		AmbiguousReference,
		AmbiguousTableRef,
		AmbiguousColumnRef,
		AmbiguousTable,
		AmbiguousConstant,
		AmbiguousParameter,
		AmbiguousAggregate,
		AmbiguousProperty,
		AmbiguousType,
		AmbiguousInvocation,
		InvocationRequiresParentheses,
		CannotApplyUnaryOperator,
		AmbiguousUnaryOperator,
		CannotApplyBinaryOperator,
		AmbiguousOperatorOverloading,
		AmbiguousBinaryOperator,
		AmbiguousCastingOperator,
		AsteriskModifierNotAllowed,
		WhenMustEvaluateToBoolIfCaseInputIsOmitted,
		CannotLoadTypeAssembly,
		CannotFoldConstants,
		CannotCast,

		MustSpecifyTableToSelectFrom,
		AggregateCannotContainAggregate,
		AggregateCannotContainSubquery,
		AggregateDoesNotSupportType,
		AggregateInWhere,
		AggregateInOn,
		AggregateInGroupBy,
		AggregateContainsColumnsFromDifferentQueries,
		[SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "InCurrent")]
		AggregateInvalidInCurrentContext,
		DuplicateTableRefInFrom,
		TableRefInaccessible,
		TopWithTiesRequiresOrderBy,
		OrderByColumnPositionIsOutOfRange,
		WhereClauseMustEvaluateToBool,
		HavingClauseMustEvaluateToBool,
		SelectExpressionNotAggregatedAndNoGroupBy,
		SelectExpressionNotAggregatedOrGrouped,
		HavingExpressionNotAggregatedOrGrouped,
		OrderByExpressionNotAggregatedAndNoGroupBy,
		OrderByExpressionNotAggregatedOrGrouped,
		OrderByInvalidInSubqueryUnlessTopIsAlsoSpecified,
		InvalidDataTypeInSelectDistinct,
		InvalidDataTypeInGroupBy,
		InvalidDataTypeInOrderBy,
		InvalidDataTypeInUnion,
		DifferentExpressionCountInBinaryQuery,
		OrderByItemsMustBeInSelectListIfUnionSpecified,
		OrderByItemsMustBeInSelectListIfDistinctSpecified,
		GroupByItemDoesNotReferenceAnyColumns,
		ConstantExpressionInOrderBy,
		TooManyExpressionsInSelectListOfSubquery,
		InvalidRowReference,
		NoColumnAliasSpecified,
		CteHasMoreColumnsThanSpecified,
		CteHasFewerColumnsThanSpecified,
		CteHasDuplicateColumnName,
		CteHasDuplicateTableName,
		CteDoesNotHaveUnionAll,
		CteDoesNotHaveAnchorMember,
		CteContainsRecursiveReferenceInSubquery,
		CteContainsUnexpectedAnchorMember,
		CteContainsMultipleRecursiveReferences,
		CteContainsUnion,
		CteContainsDistinct,
		CteContainsTop,
		CteContainsOuterJoin,
		CteContainsGroupByHavingOrAggregate,
		CteHasTypeMismatchBetweenAnchorAndRecursivePart
	}
}